//
//  ViewController.m
//  UIHomework_2016.5.13
//
//  Created by dllo on 16/5/13.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "ViewController.h"
#import "LTView.h"
@interface ViewController ()

@end

@implementation ViewController

- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        [self config];
    }


    return self;

}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor grayColor];
    [self createconfig];
    
    

}
- (void)config{

    self.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"主页" image:[UIImage imageNamed:@"unknown.png"] tag:100];
    
  }
- (void)createconfig{
       
    
    self.navigationItem.title = @"首页";
    LTView *viewofuser = [LTView ltviewWithFrame:CGRectMake(50, 80, 250, 40) title:@"用户名" placeholder:@"请输入用户名"];
    viewofuser.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:viewofuser];
    [viewofuser release];
    LTView *viewofcode = [LTView ltviewWithFrame:CGRectMake(50, 150, 250, 40) title:@"密码" placeholder:@"请输入密码"];
    viewofcode.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:viewofcode];
    [viewofcode release];
   
    UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(50, 300, 50, 30)];
    [self.view addSubview:button];
    [button release];
    button.backgroundColor = [UIColor whiteColor];
    [button setTitle:@"登录" forState:UIControlStateNormal];

    UIButton *buttonofregister = [[UIButton alloc] initWithFrame:CGRectMake(150, 300, 50, 30)];
    [self.view addSubview:buttonofregister];
    [buttonofregister release];
    buttonofregister.backgroundColor = [UIColor whiteColor];
    [buttonofregister setTitle:@"注册" forState:UIControlStateNormal];


}






@end
